<nav class="navbar navbar-default">
    <div class="container-fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
        </div>
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <!--todo : home-->
                <!--todo : 这里需要斜杠-->
                <li class="active">
                    <!--todo : 路由传递参数-->
                    <a [routerLink]="['/home']" [queryParams]="{id:1}" href="javascript:;">home<span class="sr-only">(current)</span></a>
                </li>
                <!--todo : product-->
                <li><a [routerLink]="['/product','123']" href="javascript:;">product</a></li>
                <!--todo : 测试能获取商品信息-->
                <li><a [routerLink]="['/about','1']" href="javascript:;">about1</a></li>
                <!--todo : 测试不能获取商品信息,跳转到home-->
                <li><a [routerLink]="['/about','2']" href="javascript:;">about2</a></li>
                <!--todo : 辅助路由-->
                <li><a [routerLink]="[{outlets:{chat:'openChat1'}}]" href="javascript:;">open chat</a></li>
                <!--todo : 关闭辅助路由-->
                <li><a [routerLink]="[{outlets:{chat:null}}]" href="javascript:;">close chat</a></li>
                <!--todo : 辅助路由和home一起打开-->
                <li>
                    <a [routerLink]="[{outlets:{primary:'home',chat:'openChat1'}}]" href="javascript:;">open chat and show home</a>
                </li>
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">other
                        <span class="caret"></span></a>
                    <ul class="dropdown-menu">
                        <!--todo : product-->
                        <!--todo : 通过点击事件跳转到product页面-->
                        <li><a (click)="toProduct()" href="javascript:;">Action</a></li>
                        <li><a href="#">Another action</a></li>
                        <li><a href="#">Something else here</a></li>
                        <li role="separator" class="divider"></li>
                        <li><a href="#">Separated link</a></li>
                        <li role="separator" class="divider"></li>
                        <li><a href="#">One more separated link</a></li>
                    </ul>
                </li>
            </ul>
        </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
</nav>
